package service.impl;

import dao.DoctorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.Doctor;
import service.DoctorService;

import java.util.List;

@Service
public class DoctorServiceImpl implements DoctorService {
    @Autowired
    private DoctorMapper doctorMapper;

    @Override
    public List<Doctor> findAll() {
        return doctorMapper.findAll();
    }

    @Override
    public Doctor findById(String docId) {
        return doctorMapper.findById(docId);
    }

    @Override
    public int add(Doctor doctor) {
        return doctorMapper.add(doctor);
    }

    @Override
    public int update(Doctor doctor) {
        return doctorMapper.update(doctor);
    }

    @Override
    public int delete(String docId) {
        return doctorMapper.delete(docId);
    }

    @Override
    public List<Doctor> findByDocName(String doc_name) {
        return doctorMapper.findByDocName(doc_name);
    }
    @Override
    public List<Doctor> findByDepartId1(String depart_id1) {
        return doctorMapper.findByDepartId1(depart_id1);
    }
    @Override
    public List<Doctor> findByUserName(String user_name){
        return doctorMapper.findByUserName(user_name);
    }
}